<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>系统管理</cite></a>
        <a><cite>基础设置</cite></a>
    </div>
</div>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layuiadmin-card-header-auto">
            <button class="layui-btn layuiadmin-btn" data-type="add">添加</button>
        </div>
        <div class="layui-card-body">
            <table id="layuiadmin-table" lay-filter="layuiadmin-table"></table>
            <script type="text/html" id="layuiadmin-app-btns">
                <a
                        class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i
                        class="layui-icon layui-icon-edit"></i>编辑</a>        {{# if(d.id != 1){ }}        <a
                        class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i
                        class="layui-icon layui-icon-delete"></i>删除</a>        {{# } }}
            </script>
        </div>
    </div>
</div>
<script>
    layui.use(['form', 'helper', 'laytpl', 'baseTable', 'element'], function () {
        var form   = layui.form,
            $      = layui.$,
            baseTable = layui.baseTable,
            helper = layui.helper;
        var config      = {
            title         : '配置'
            , requestUrl  : '/site-config'
            , formTemplate: 'admin/config/form'
            , tableCols   : [{
                field  : 'id'
                , width: 100
                , title: 'ID'
            }, {
                field     : 'type'
                , title   : '配置类型'
                , width: 100
            }, {
                field     : 'name'
                , title   : '配置名'
                , width: 200
            }, {
                field     : 'value'
                , title   : '配置值'
            }, {
                title    : '操作'
                , width  : 250
                , align  : 'center'
                , fixed  : 'right'
                , toolbar: '#layuiadmin-app-btns'
            }]
            , areaWidth   : 550
            , areaHeight  : 500
        };
        baseTable.render(config);
    });
</script>